package com.gxuwz.Market.business.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gxuwz.Market.business.dao.ServiceAcademyDAO;
import com.gxuwz.Market.business.entity.ServiceAcademy;
import com.gxuwz.core.pagination.Result;


@Service("serviceAcademyService")
public class ServiceAcademyImpl implements IServiceAcademyService {
	@Autowired
	private ServiceAcademyDAO serviceAcademyDAO;

	@Override
	public ServiceAcademy findById(int id) {
		// TODO Auto-generated method stub
		return serviceAcademyDAO.findById(id);
	}

	@Override
	public List<ServiceAcademy> findAll() {
		// TODO Auto-generated method stub
		return serviceAcademyDAO.findAll();
	}

	@Override
	public Result<ServiceAcademy> find(ServiceAcademy serviceAcademy, int page, int size) {
		// TODO Auto-generated method stub
		return serviceAcademyDAO.find(serviceAcademy, page, size);
	}

	@Override
	public List<ServiceAcademy> findByProperty(String property, String value) {
		// TODO Auto-generated method stub
		return serviceAcademyDAO.findByProperty(property, value);
	}

	@Override
	public void add(ServiceAcademy serviceAcademy) {
		// TODO Auto-generated method stub
		serviceAcademyDAO.save(serviceAcademy);

	}

	@Override
	public void delete(int id) {
		// TODO Auto-generated method stub
		ServiceAcademy serviceAcademy = serviceAcademyDAO.findById(id);
		serviceAcademyDAO.remove(serviceAcademy);

	}

	@Override
	public void update(ServiceAcademy serviceAcademy) {
		// TODO Auto-generated method stub
		serviceAcademyDAO.update(serviceAcademy);

	}

}
